package com.shoujifeng.snowmusic.player.utils;

import android.content.Context;
import android.content.SharedPreferences;

public class SharedPreferencesUtil {
	private final String PREFERENCE_NAME = "cache";
	private  SharedPreferences mSharedPreferences;

	public SharedPreferencesUtil(Context context) {
		mSharedPreferences = context.getSharedPreferences(PREFERENCE_NAME,Context.MODE_PRIVATE);
	}
	public boolean setPhoneWidth(int width){
		return mSharedPreferences.edit().putInt("phone_width", width).commit();
	}
	/**
	 * ��ȡ�ֻ���Ļ���
	 * @return
	 */
	public int getPhoneWidth(){
		return mSharedPreferences.getInt("phone_width", 0);
	}
	/**************************************************************************************************************************************************************/		
	/**
	 * �����ֻ���Ļ�߶�
	 * @param height
	 * @return
	 */
	public boolean setPhoneHeight(int height){
		return mSharedPreferences.edit().putInt("phone_height", height).commit();
	}
	/**
	 * ��ȡ�ֻ���Ļ�߶�
	 * @return
	 */
	public int getPhoneHeight(){
		return mSharedPreferences.getInt("phone_height", 0);
	}
}
